package com.example.uploaddemo.config;

import io.minio.MinioClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MinoConfig {
    @Value(value = "${minio.url}")
    private String url;
    @Value(value = "${minio.user}")
    private String user;
    @Value(value = "${minio.password}")
    private String password;

    @Bean
    public MyMinioClient minioConfig(){
       return new MyMinioClient(MinioClient.builder().endpoint(url).credentials(user,password).build());
    }
}
